#ifndef MYSCENE_H
#define MYSCENE_H

#include <QGraphicsScene>
#include <QTimer>
#include <QPixmap>
#include <QDebug>
#include <QGraphicsProxyWidget>
#include "game/mycar.h"
#include "game/npccar.h"
#include "game/myoption.h"
#include "common/common.h"
#include "common/statusvalue.h"

class MyScene : public QGraphicsScene
{
    Q_OBJECT
public:
    explicit MyScene(QObject *parent = 0);

signals:
    void SendDy(const qreal &dy);
    void LoadingEnd();
    void pause();
    void over();

public slots:
    void work();
    void GetSpeed(const qreal &Speed);
    void beginGame();
    void pauseGame();
    void continueGame();
    void gameOver();
    void setPos(const qreal &x, const qreal &y);

private:
    qreal dy;
    MyOption *option;
    MyItem *mycar;
    Item *car1;
    Item *car2;
    Item *car3;
    Item *car4;
    QTimer *timer;
    qreal speed;
    QGraphicsProxyWidget *proxy;
};

#endif // MYSCENE_H
